﻿@model IEnumerable<IkoulaACDF.Models.TrampViewModel>
@section scripts {
    @Scripts.Render("~/bundles/fancybox")

    <script type="text/javascript">
        $(document).ready(function () {
            $(".fancybox").fancybox({
                helpers: {
                    title: {
                        type: 'float',
                    },
                },
                openEffect: 'none',
                closeEffect: 'elastic',
                nextEffect: 'fade',
                prevEffect: 'fade',
            })
        });
    </script>

    <script type="text/javascript">
        $('#myModal').modal('show');
    </script>
}


@{
    ViewBag.Title = "Logos Tramp";
}
<h2>@ViewBag.Title.</h2>

<!-- container -->
<div class="container">

    <!--  main row -->
    <div class="row">
        <!-- left col -->
        <div class="col-lg-8 col-sm-12">
            @foreach (var group in Model.Select((x, index) => new { element = x, index }).GroupBy(x => x.index / 2, x => x.element))
            {
                <div class="col-lg-4 col-sm-12">

                    @foreach (var item in group)
                    {
                    <div class="thumbnail">
                        <a class="fancybox" title="@item.MetaData" href="@item.FilePath">
                            <img src="@item.FilePath" alt="" />
                        </a>
                        <div class="caption">
                            <h5>@item.MetaData</h5>
                        </div>
                    </div>
                    }
                </div>
            }
        </div><!-- left col -->
        <!-- right col -->
        <div class="col-lg-4 col-sm-12">
            @Html.Partial("_NewsPartial")
        </div><!-- right col -->

    </div><!-- main row -->

</div><!-- container -->
